package cn.v2tila.rsosa.student.jpa;

import cn.v2tila.rsosa.student.entity.MsgTemplateEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author v2tila on 18:20 2019/4/5
 */

public interface MsgTemplateJPA extends JpaRepository<MsgTemplateEntity, Integer>, JpaSpecificationExecutor<MsgTemplateEntity> {
    MsgTemplateEntity saveAndFlush(MsgTemplateEntity msgTemplateEntity);

    @Transactional
    void deleteById(Integer id);

    List<MsgTemplateEntity> findByUniqueId(String uniqueId);
}
